const KEY = 'crs_sls_sys'

export const getInfo = () => {
  const obj = { id: '', account: '', password: '', role: '', name: '' }
  const res = localStorage.getItem(KEY)
  return res ? JSON.parse(res) : obj
}

export const setInfo = (user) => {
  localStorage.setItem(KEY, JSON.stringify(user))
}

export const removeInfo = () => {
  localStorage.removeItem(KEY)
}
